﻿using System.ComponentModel;
using System.IO;
using Styx;
using Styx.Helpers;

namespace GatherHelper
{
    public class GatherHelperSettings : Settings
    {
        private static GatherHelperSettings _instance;

        public GatherHelperSettings()
            : base(Path.Combine(Path.Combine(SettingsDirectory, "GatherHelper Settings"), string.Format("GatherHelperSettings_{0}.xml", StyxWoW.Me.Name)))
        {

        }

        public static GatherHelperSettings Instance { get { return _instance ?? (_instance = new GatherHelperSettings()); } }

        #region Category : GatherHelper

        [Setting]
        [Category("GatherHelper")]
        [Styx.Helpers.DefaultValue(false)]
        [DisplayName("Debug")]
        [Description("Any cool information about helpers will get logged...")]
        public bool HelperDebug { get; set; }

        [Setting]
        [Category("GatherHelper")]
        [Styx.Helpers.DefaultValue(10)]
        [DisplayName("Distance to Dismount")]
        [Description("Will dismount when the toon will reach that distance from a node")]
        public int DistanceToDismount { get; set; }

        #endregion

        #region Category : StuckHandler

        [Setting]
        [Category("StuckHandler")]
        [Styx.Helpers.DefaultValue(false)]
        [DisplayName("Debug")]
        [Description("Any cool information about stucks will get logged...")]
        public bool StuckDebug { get; set; }

        [Setting]
        [Category("StuckHandler")]
        [Styx.Helpers.DefaultValue(30)]
        [DisplayName("Check every")]
        [Description("Check every X seconds if we are stuck.")]
        public int StuckTimerMax { get; set; }

        [Setting]
        [Category("HearthStone")]
        [Styx.Helpers.DefaultValue(false)]
        [DisplayName("Use Hearthstone")]
        [Description("Enable/Disable Hearthstone usage when Stuck")]
        public bool UseHearthstoneWhenStuck { get; set; }

        [Setting]
        [Category("HearthStone")]
        [Styx.Helpers.DefaultValue(10)]
        [DisplayName("HS Stuck Count")]
        [Description("How many stucks before HB will be using HS")]
        public int HearthstoneStuckCount { get; set; }

        [Setting]
        [Category("HB Exit")]
        [Styx.Helpers.DefaultValue(false)]
        [DisplayName("Kill HB")]
        [Description("Enable/Disable Killing HB when stuck")]
        public bool KillHBWhenStuck { get; set; }

        [Setting]
        [Category("HB Exit")]
        [Styx.Helpers.DefaultValue(20)]
        [DisplayName("KillHB Stuck Count")]
        [Description("How many stucks before HB will be using HS")]
        public int KillHBStuckCount { get; set; }

        #endregion

        #region Category : NodesHandler


        [Setting]
        [Category("Nodes Blacklisting")]
        [Styx.Helpers.DefaultValue(false)]
        [DisplayName("Blacklist Dangerous nodes")]
        [Description("Nodes with enemies arounds are automatically blacklisted")]
        public bool EnableBlackListingNodes { get; set; }

        [Setting]
        [Category("Nodes Blacklisting")]
        [Styx.Helpers.DefaultValue(false)]
        [DisplayName("Log blacklisted nodes")]
        [Description("Every Blacklisted node will appear in log with detected")]
        public bool LogBlacklistedNodes { get; set; }

        [Setting]
        [Category("Nodes Blacklisting")]
        [Styx.Helpers.DefaultValue(1)]
        [DisplayName("Number of units around min.")]
        [Description("Minimal number of units around to blacklist the node")]
        public int NumberOfEnemiesAroundNodeMin { get; set; }

        [Setting]
        [Category("Nodes Blacklisting")]
        [Styx.Helpers.DefaultValue(17)]
        [DisplayName("Distance of units from node.")]
        [Description("Minimal distance between hostile mob and node")]
        public int DistanceOfUnitFromNodeMin { get; set; }

        #endregion

        #region Category : FileDebug

        [Setting]
        [Category("Files")]
        [Styx.Helpers.DefaultValue(false)]
        [DisplayName("Debug")]
        [Description("Any cool information about files (hotspots ones) will get logged...")]
        public bool FileDebug { get; set; }

        #endregion

    }

}

